package com.seed.core.dialect.impl;

import com.seed.core.dialect.DialectDDL;
import com.seed.core.pojo.seed.Seed;

import java.util.Map;

public class DialectDDLImpl implements DialectDDL {
    private final DialectDDL ddl;

    public DialectDDLImpl(String ddlKey) {
        this.ddl = switch (ddlKey.toLowerCase()) {
            case "sqlserver" -> throw new RuntimeException("未实现sqlServer");
            case "oracle" -> throw new RuntimeException("未实现oracle");
            case "mysql" -> new MysqlDialectDDL();
            default -> throw new RuntimeException("未实现");
        };
    }

    public void run(Map<String, Seed> seeds) {
        ddl.run(seeds);
    }
}
